<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
    <%@include file="common/head.jspf"%>
    <title>商家详情</title>
</head>
<body id="shop-detail">
<nav class="navbar text-nav" role="navigation">
    <a class="pull-left btn-back" href="shoplist?type=<c:out value="${param.type}"/>"><i class="icon-chevron-left"></i></a>
    <div class="center-block nav-title"><c:out value="${shop.name}"/></div>
</nav>
<div class="container-fluid">
    <div class="row">
        <img src="images/xcd.jpg"/>
    </div>
    <c:forEach items="${service}" var="l">
    <div class="row">
        <div class="col-xs-offset-1 col-xs-3 col-sm-offset-1 col-sm-3"><c:out value="${l.tag1}"/></div>
        <div class="col-xs-offset-1 col-xs-3 col-sm-offset-1 col-sm-3"><c:out value="${l.creditcost}"/>积分</div>
        <div class="col-xs-4 col-sm-4">
            <a href="addOrder?id=<c:out value="${l.id}"/>" class="btn btn-pa center-block">立即兑换</a>
        </div>
    </div>
    </c:forEach>
    <div class="row">
        <div class="col-xs-offset-1 col-xs-10 col-sm-offset-1 col-sm-10">
            地址：<c:out value="${shop.location}"/>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-offset-1 col-xs-6 col-sm-offset-1 col-sm-6">
           电话：<c:out value="${shop.con}"/>
        </div>
        <div class="col-xs-offset-1 col-xs-4 col-sm-offset-1 col-sm-4">
                评分：
                <c:choose>
                    <c:when test="${(empty shop.starsum) || (empty shop.ordersum) || (shop.ordersum == 0) }">0</c:when>
                    <c:otherwise><c:out value="${shop.starsum/shop.ordersum}"/></c:otherwise>
                </c:choose>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-offset-1 col-xs-10 col-sm-offset-1 col-sm-10">
            <p>营业时间：<c:out value="${shop.bh}"/></p>
        </div>
    </div>

</div>
</body>
</html>
